@echo off
set service="hl7.service"
if "%1"=="on" (
    n64 install %service% %cd%\hl7.service.exe
    n64 set %service% AppParameters 5001 http://127.0.0.1:8080/api/hl7
    n64 set %service% AppDirectory %cd%
    n64 set %service% AppStdout %cd%\hl7.service.log
    n64 set %service% AppStderr %cd%\hl7.service.log
    n64 set %service% AppExit Default Restart
    n64 set %service% AppRestartDelay 0
    n64 start %service%
) else if "%1"=="off" (
    n64 stop %service%
    n64 remove %service% confirm
) else (
    echo please input "on" or "off"
)
